package com.intelligentcar.springboot.mapper;

import com.intelligentcar.springboot.bean.Linelist;
import com.intelligentcar.springboot.bean.Scheduling;
import com.intelligentcar.springboot.bean.Station;
import com.intelligentcar.springboot.bean.Vehicle;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface StationMapper {
    //插入站点
    public int insertStation(Station station);

    //查询站点
    public List<Station> selectStation();

    //查询线路
    public List<Linelist> selectLine();

    //插入线路
    public int insertLine(Linelist linelist);

    //删除站点(软删除)
    public int deleteStation(@Param(value = "id")String id);

    //修改站点
    public int updateStation(@Param(value = "stationName")String stationName,
                             @Param(value = "id")Long id);

    //删除线路
    public int deleteLine(@Param(value = "lineState")String lineState,
                          @Param(value = "luid")Long luid);

    //查询线路id
    public List<Linelist> selectLineId();

    //查询车辆号
    public List<Vehicle> selectVehicleId();

    //查询车站编号
    public List<Station> selectStationId();

    //查询站点表种的所有站点
    public List<Station> selectstation();

    //删除站点(软删除)
    public int deleteStation(@Param(value = "id")String id,
                             @Param(value = "stationName")String stationName);

    //修改站点
    public int updateStation(@Param(value = "stationName")String stationName,
                             @Param(value = "selectLngLat")String selectLngLat,
                             @Param(value = "id")Long id);


    //查询车站名
    public List<Station> selectStationName();


    //查询车站点
    public List<Station> selectStation2(@Param(value = "stationName")String stationName,
                                        @Param(value = "id")Long id);

    //查询线路
    public List<Linelist> selectLineList();

    //查询单个线路
    public List<Linelist> selectOneLineList(@Param(value = "lineId")String lineId);

    //删除单个线路
    public int deleteOneLineList(@Param(value = "lineId")String lineId);

    //修改线路
    public int updateLine(
            @Param(value = "insertBeginLineName")String insertBeginLineName,
            @Param(value = "insertEndLineName")String insertEndLineName,
            @Param(value = "lineId")String lineId);

    //查询一共有多少站点
    public int selectCountStation( @Param(value = "rid")String rid);
}
